package com.niguang.schedule;


import com.niguang.work.api.weChatTemplate.service.MonitorWeChatService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


@JobHandler("deviceSchedule")
@Component
@Slf4j
public class DeviceSchedule extends IJobHandler {


    @Resource
    private MonitorWeChatService monitorWeChatService;

    @Override
    public ReturnT<String> execute(String param) {
        // 查询所有已绑定工地闸机设备
        Boolean aBoolean = monitorWeChatService.sendMonitor();
        return aBoolean ? ReturnT.SUCCESS : ReturnT.FAIL;
    }
}
